package com.micai.springboot.entity;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.micai.springboot.base.BizEntity;

/**
 * @Auther: zhaoxinguo
 * @Date: 2018/11/2 16:35
 * @Description: 组织机构表
 */
@TableName("au_organization")
public class OrganizationEntity extends BizEntity<OrganizationEntity> {

    @TableField("name")
    private String name; // 组织机构名称

    @TableField("parent_id")
    private Long parentId; // 上级编号

    @TableField("available")
    private Boolean available = Boolean.TRUE; // 是否可用 0可用 1不可用

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public Boolean getAvailable() {
        return available;
    }

    public void setAvailable(Boolean available) {
        this.available = available;
    }

    public boolean isRootNode() {
        return parentId.equals("0");
    }
}
